package com.etoak.service.impl;

import cn.hutool.core.date.DateUtil;
import cn.hutool.crypto.digest.MD5;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.etoak.entity.User;
import com.etoak.mapper.UserMapper;
import com.etoak.service.UserService;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

    @Override
    public void add( User user) {
        user.setPassword(MD5.create().digestHex("123456"));
        user.setCreateTime(DateUtil.now());

        this.save(user);
        // baseMapper.insert(user);
    }
}
